Persistence Software: Bridging Object-Oriented Programming and Relational Databases1

نویسندگان

  • Arthur M. Keller
  • Richard Jensen
  • Shailesh Agarwal
چکیده

Building object oriented applications which access relational data introduces a number of technical issues for developers who are making the transition to C++. We describe these issues and discuss how we have addressed them in Persistence, an application development tool that uses an automatic code generator to merge C++ applications with relational data. We use client-side caching to provide the application program with efficient access to the data. 1. INTERFACING C++ CLASSES WITH RELATIONAL DATA Object orientation promises dramatic benefits in software productivity, quality and reusability. Yet as with most technology innovations, it requires a significant break from the development practices of the past. Specifically, the difficulty of integrating objects with relational databases has emerged as a major barrier to adoption of object technology by developers who have a significant existing base of hierarchical or relational data. Today, C++ developers have to hand code an interface between their objects and their existing relational databases. For many projects, this task alone accounts for 20 30% of the total programming effort. Using a code generator to automate this work can provide improvements in productivity and quality of C++ applications. This 1 For further information on Persistence Software, please write to 1650 South Amphlett Blvd., Suite 100, San Mateo, CA 94402 or [email protected] 2 Author's address: Stanford University, Computer Science Dept., Stanford, CA 94305-2140, [email protected] 3 Author's address: Persistence Software (see above), [email protected] 4 Author's address: Persistence Software (see above), [email protected] approach also provides a way for companies to transition to C++ applications while leveraging existing investments in relational data. 2. ALTERNATE APPROACHES One approach for interfacing C++ classes to a relational database is through a C++ class library, containing classes that model relational entities such as tables, tuples and fields. To build an application, the developer customizes these building blocks by specifying a mapping between a generic tuple instance and a specific class instance. Inheritance, associations and runtime behaviors must be hand-coded. In contrast, a code generator produces C++ classes directly from the application object model information. The developer can concentrate on the correctness of the model while the code generator automatically creates the database interface portion of the application. The code generator can also create a table schema based on the object model, or map the object model into an existing table schema. The application object model supplies the information about inheritance, attributes and associations; the code generator translates these inputs into appropriate table structures and C++ class definitions. Classes may be related via a generalization-specialization hierarchy or binary associations. (Persistence does not currently support aggregation of classes or higher-order associations.) 3. BENEFITS OF DATABASE INTERFACE GENERATOR FOR C++/RDB ACCESS Manually interfacing C++ classes to relational tables is feasible, but becomes tedious and prone to error when many classes exist. It is also hard to ensure that the semantics of the model are enforced. A Database Interface Generator (“generator”) automates this repetitive task and provides a uniform interface for each class in the model. By providing consistency checks at the model level, the generator can increase the confidence in the quality of the database access portion of the application. Description of Database Interface Generator Approach Using the application object model to drive the code generation preserves the semantics of the model. The code generator takes care of: • Encapsulating database access for classes and attributes.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fitting Round Objects Into Square Databases1

Object-oriented systems could use much of the functionality of database systems to manage their objects. Persistence, object identity, storage management, distribution and concurrency control are some of the things that database systems traditionally handle well. Unfortunately there is a fundamental difference in philosophy between the object-oriented and database approaches, namely that of obj...

متن کامل

Object Persistence Techniques - A Study of Approaches, Benefits, Limits and Challenges

Object-Oriented paradigm becomes pioneer and best choice while selecting language and writing software solution. In last few decades there was significant change observed in developing software solutions. Most of the application developers prefer the object oriented model to exploit its benefits. The major benefit we can obtain from ObjectOrientation is of course object itself and the feature t...

متن کامل

Eliminating the Impedance Mismatch Between Relational Systems and Object-Oriented Programming Language

Relational database management systems have been widely used in industry for many years. Although there has been much research done for developing object-oriented database systems recently, it is believed that relational database systems will still dominate the market for many years. On the other hand, object-oriented programming languages become more acceptable by software developers. It is th...

متن کامل

Eliminating the Impedance Mismatch Between RelationalSystems and Object - Oriented Programming

Relational database management systems have been widely used in industry for many years. Although there has been much research done for developing object-oriented database systems recently, it is believed that relational database systems will still dominate the market for many years. On the other hand, object-oriented programming languages become more acceptable by software developers. It is th...

متن کامل

COMan - Coexistence of Object-Oriented and Relational Technology

Applying object-oriented technology to systems development is widely recognized as improving productivity and reducing system maintenance costs. At the same time, relational technology has gained leverage in most businesses. There exist already several proposals to combine object-oriented programming with relational database systems. Yet, existing approaches do not support necessary combination...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1993